﻿using System;

namespace NotAClue.ComponentModel.DataAnnotations
{
    /// <summary>
    /// Set's the images attributes
    /// </summary>
    public class ImageFormatAttribute : Attribute
    {
        /// <summary>
        /// Gets or sets a value indicating whether [display in edit].
        /// </summary>
        /// <value><c>true</c> if [display in edit]; otherwise, <c>false</c>.</value>
        public bool DisplayInEdit { get; set; }

        /// <summary>
        /// Gets or sets the display width.
        /// </summary>
        /// <value>The display width.</value>
        public int DisplayWidth { get; private set; }

        /// <summary>
        /// Gets or sets the display height.
        /// </summary>
        /// <value>The display height.</value>
        public int DisplayHeight { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="ImageFormatAttribute"/> class.
        /// </summary>
        /// <param name="displayWidth">The display width.</param>
        /// <param name="displayHeight">The display height.</param>
        public ImageFormatAttribute(int displayWidth, int displayHeight)
        {
            DisplayWidth = displayWidth;
            DisplayHeight = displayHeight;
            DisplayInEdit = true;
        }
    }
}